﻿<Window x:Class="WPFMVVMApplcation.View.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        WindowStartupLocation="CenterScreen"
        WindowState="Normal"
        ResizeMode="NoResize"
        Title="WPF MVVM APP"
        Height="300" Width="300">
    <Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" Margin="5">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <TextBlock Text="{Binding SelectedItem.Name, Mode=TwoWay}" Grid.Row="0" Grid.Column="0" />
        <Button Content="Edit" Width="100"  Grid.Row="0" Grid.Column="1" HorizontalAlignment="Right" 
                Command="{Binding EditSelectedItemCommand}"
                /> 
        <!--Command="EditSelectedItemCommand"/>-->
        <ListBox Grid.Row="1" Grid.ColumnSpan="2" Margin="0,5,0,5" VerticalAlignment="Stretch"
                 ItemsSource="{Binding PatientList, Mode=TwoWay}"
                 DisplayMemberPath="Name"
                 SelectedItem="{Binding SelectedItem, Mode=TwoWay}">
            
        </ListBox>
    </Grid>
</Window>
